<%#
 (c) Copyright Ascensio System SIA 2024

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
%>

<header>
  <div class="center main-nav">
    <a href="./">
        <img src ="assets/logo.svg" alt="ONLYOFFICE" />
    </a>
  </div>
  <menu class="responsive-nav">
    <li>
      <a href="#">
        <img src="assets/mobile-menu.svg" alt="ONLYOFFICE" />
      </a>
    </li>
    <li>
      <a href="./">
        <img src ="assets/mobile-logo.svg" alt="ONLYOFFICE" />
      </a>
    </li>
  </menu>
</header>
<div class="center main">
  <table class="table-main">
    <tbody>
      <tr>
        <td class="left-panel section"></td>
        <td class="section">
          <div class="main-panel">
              <menu class="links">
                <li class="home-link" >
                  <a href="./">
                    <img src="assets/home.svg" alt="Home"/>
                  </a>
                </li>
                <li class="active">
                  <a href="forgotten">Forgotten files</a>
                </li>
              </menu>
              <div class="stored-list">
                <div class="storedHeader">
                    <div class="storedHeaderText">
                        <span class="header-list">Your documents</span>
                    </div>
                </div>
                <table class="tableHeader" cellspacing="0" cellpadding="0" width="100%">
                    <thead>
                      <tr>
                          <td class="tableHeaderCell">Filename</td>
                          <td class="tableHeaderCell">Action</td>
                      </tr>
                    </thead>
                </table>
                <div class="scroll-table-body">
                  <table cellspacing="0" cellpadding="0" width="100%">
                    <tbody>
                      <% for file in @files %>
                        <tr class="tableRow" title="<%= file['name'] %>">
                            <td>
                                <a class="stored-edit action-link <%= file['type'] %>" href="<%= file['url'] %>" target="_blank">
                                    <span><%= file['key'] %></span>
                                </a>
                            </td>
                            <td>
                                <a href="<%= file['url'] %>">
                                    <img class="icon-download" src="assets/download.svg" alt="Download" title="Download" /></a>
                                <a class="delete-file" data="<%= file['key'] %>">
                                    <img class="icon-action" src="assets/delete.svg" alt="Delete" title="Delete" /></a>
                            </td>
                        </tr>
                      <% end %>
                    </tbody>
                  </table>
                </div>
              </div>
          </div>
        </td>
      </tr>
    </tbody>
  </table>
</div>

<footer>
  <div class="center">
    <table>
        <tbody>
            <tr>
                <td>
                    <a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
                </td>
                <td>
                    <a href="mailto:sales@onlyoffice.com">Submit your request</a>
                </td>
                <td class="copy">
                    &copy; Ascensio System SIA <%= Time.now.year %>. All rights reserved.
                </td>
            </tr>
        </tbody>
    </table>
  </div>
</footer>

<%= stylesheet_link_tag "forgotten" %>
<%= javascript_include_tag "forgotten" %>
